1. Field of the Invention
The present invention relates to an image coding method and apparatus for compressing and coding a moving picture.
2. Description of the Background Art
As a moving picture compressing and coding method, MPEG1 and MPEG2 methods and the like have been known in the prior art. These methods have used a predictive coding method which utilizes a motion vector to reduce a redundancy between a frame and a field (hereinafter referred to as an "image plane") and a transform coding method which utilizes orthogonal transform (discrete cosine transform) to reduce the redundancy in the image plane. In these methods, furthermore, an input image signal is divided into blocks having a predetermined size (hereinafter referred to as a "coding block") for which a coding processing is performed, respectively.
FIG. 25 is a block diagram showing an image coding apparatus having a function of the MPEG2 according to the prior art. In FIG. 25, the reference numeral 101 denotes a function block for detecting a motion vector, the reference numeral 102 denotes a function block (prediction mode discriminator) for controlling predictive coding, the reference numeral 103 denotes a function block for performing coding according to control of the function block 102 on receipt of a video input filtered by a function block 115 (a coding object image plane) and a prediction image (reference image plane) generated by a function block 112, the reference numeral 104 denotes a function block for performing discrete cosine transform while carrying out blocking by a function block 116, the reference numeral 106 denotes a function block for performing quantization, the reference numeral 109 denotes a function block for transforming an output of the function block 106 into a bit stream, the reference numeral 107 denotes a function block for performing inverse quantization, the reference numeral 109 denotes a function block for performing inverse discrete cosine transform, the reference numeral 110 denotes a function block for reconfiguring an image in response to an output of the function block 108 and that of the function block 112 for generating a prediction image, the reference numeral 105 denotes a function block for storing an output of the function block 110 which is limited by a function block 111, the reference numeral 113 denotes a function block for detecting that a scene of the image plane is changed or not, i.e., a scene change, and the reference numeral 114 denotes a function block for controlling the function block 106.
The function block 102 has function blocks 2a to 2c. The function block 2a controls to perform coding using two motion vectors or one motion vector. The function block 2b controls to perform motion compensation (MC) or not. The function block 2c controls to perform intraframe prediction (INTRA) or interframe prediction (INTER).
FIG. 26 is a diagram for explaining the predictive coding method. In the predictive coding method, a rectangle which is the most similar to a coding block 921 in a coding object image plane 920 at a time t2 is retrieved from a predetermined area 900 of a reference image plane 910 at a time t1. Next, a difference between a retrieved rectangle 911 and the coding block 921 is generated. Coding is performed for the difference. Information about the rectangle 911 which has been used is added as header information when the coding is performed. The header information indicates a displacement of the coding block, that is, a motion vector MV.
Coding data obtained by performing the predictive coding includes the header information and data about pixels of the coding block (difference pixel coding data).
Predictive coding operation has an effect that a redundancy between the reference image plane 910 and the coding object image plane 920 is reduced. However, when a correlation between the reference image plane 910 and the coding object image plane 920 is low, the redundancy between the reference image plane 910 and the coding object image plane 920 is low. Accordingly, if the predictive coding is performed for the coding block before coding when the redundancy between the reference image plane 910 and the coding object image plane 920 is low, the obtained effects are reduced because the redundancy is originally low. More specifically, when the redundancy between the reference image plane 910 and the coding object image plane 920 is low, a coding quantity of the coding data has no great difference in the cases where the coding is exactly performed for the coding block 921 and where the predictive coding is performed for the coding block 921 before the coding. The reason is that the coding quantity is increased corresponding to an addition of the header information.
In the prior art, thus, there has been a problem that the coding quantity of the coding data is increased if the predictive coding is performed for the coding block before the coding when the redundancy between the reference image plane 910 and the coding object image plane 920 is low.